package hsintiao.com.xintiaoAPP.mapper;

import hsintiao.com.xintiaoAPP.entity.Article;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticleMapper {

    List<Article> allArticle();//获取文章列表
    List<Article> getArticleByType(Long typeId);//根据类型id获取相关的文章列表

    Article getOneById(Long id);//根据id获取单个文章信息

    List<Article> searchByKeyword(@Param(value = "keyword") String keyword);

    List<String> getCarousel();//获得发现页面的轮播图图片地址

    List<Article> selectPageByType(@Param(value = "typeID") Long typeID,
                                   @Param(value = "start") Long start,
                                   @Param(value = "end") Long end);
}
